package user;

import cars.Factory;
import operation.ExitOperation;
import operation.IOperation;
import operation.LookVehicle;
import operation.RentMgrSys;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: mac
 * Date: 2022-11-28
 * Time: 11:30
 */
public class Customer extends User{
    public Customer(String name) {
        super(name);
        this.iOperations = new IOperation[]{
                new ExitOperation(),
                new LookVehicle(),
                new RentMgrSys(),
        };
    }

    @Override
    public int menu() {
        System.out.println("======用户登录界面=====");
        System.out.println("1.查看汽车");
        System.out.println("2.租借汽车");
        System.out.println("0.退出系统");
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入操作：");
        int choice = scanner.nextInt();
        return choice;
    }

}
